/*************************************************
Author: Aven 
Date: 12/27/2012
Description:
Notes: 
*************************************************/

#ifndef __cmdvip_h__
#define __cmdvip_h__

#include "../maindef.h"
#include "commclass.h"
#include "PBMsgHead.pb.h"

#include "MsgVip.pb.h"

class CMainCtrl;
class CCmdGetVipInfo: public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    MsgReqVipInfo   stReq;
    MsgAnsVipInfo   stAns;

    unsigned int uiGID;
};

//获取有无领取过礼包信息
class CCmdVipGiftInfo: public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    MsgReqVipGiftInfo stReq;
    MsgAnsVipGiftInfo stAns;

    unsigned int uiGID;
};

//领取礼包
class CCmdVipOpenGift: public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    MsgReqOpenGift stReq;
    MsgAnsOpenGift stAns;

    unsigned int uiGID;
};

class CCmdYellowGift: public CTAsyncCmd
{
public:
    CCmdYellowGift()
        :bHasGetVipInfo(false),
         bIsYellowVip(false),
         ucYellowLevel(0),
         bIsYearYellow(false),
         bIsBlueVip(false),
         ucBlueLevel(0),
         bIsYearBlue(false),
         bIsSuperBlue(false)
    {

    }

    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    MsgReqYellowGift stReq;
    MsgAnsYellowGift stAns;

    unsigned int uiGID;
    bool bHasGetVipInfo;

    bool bIsYellowVip;
    unsigned char ucYellowLevel;
    bool bIsYearYellow;  

    bool bIsBlueVip;
    unsigned char ucBlueLevel;
    bool bIsYearBlue;
    bool bIsSuperBlue;
    unsigned char uc3366Level;

    bool bIsGettingYellowInfo;
    bool bIsGettingBlueInfo;
    bool bIsGetting3366Info;

    bool bHasGetYellowInfo;
    bool bHasGetBlueInfo;
    bool bHasGet3366Info;
};

#endif // __cmdvip_h__
